package problems;

import java.math.BigInteger;
import java.util.HashSet;
import java.util.Set;

public class Euler029 extends AbstractEuler {

	private static final int MAX = 100;
	
	@Override
	public Number calculate() {
		Set<BigInteger> terms = new HashSet<BigInteger>();
		for (BigInteger a = BigInteger.valueOf(2); a.intValue() <= MAX; a = a.add(BigInteger.ONE)) {
			for (int b = 2; b <= MAX; b++) {
				terms.add(a.pow(b));
			}
		}
		return terms.size();
	}

	@Override
	protected Number getCorrectAnswer() {
		return 9183;
	}

}
